package partner;
import db.CryptField;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
/**
 * @author: wzq
 * @date: 14-6-18
 * description: change it at File | setting | File and code templates | include | file header
 */
public class Assit2 {
    /**
     * 首字母大写
     */
    private static String firstLetterCap(String old) {
        String firstCap = old.substring(0, 1).toUpperCase() + old.substring(1);
        return firstCap;
    }

    /**
     * 获取getter方法名
     */
    private static String retrieveGetter(String fieldName) {
        return "get" + firstLetterCap(fieldName);
    }
    /**
     * 获取setter方法名
     */
    private static String retrieveSetter(String fieldName) {
        return "set" + firstLetterCap(fieldName);
    }

    /**
     * 判断一个field是否有Annotation CryptField
     */
    private static boolean isFieldInvolveCrypt(Field field,Class<? extends Annotation> clazz) {
        return field.isAnnotationPresent(clazz);
    }
}
